package com.example.demomodule2;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Scanner;

import android.os.Environment;
import android.util.Log;

public class DataProvider implements IDataProvider {


	public String readData()
	{
		String data="";
		String sdcard=Environment
				.getExternalStorageDirectory()
				.getAbsolutePath()+"/Country.txt";
		try {
			Scanner scan=new Scanner(new File(sdcard));
			
			while(scan.hasNext())
			{
				data+=scan.nextLine()+"\n";
			}
			scan.close();
			//editdata.setText(+"");
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		return data;
	}
	@Override
	public List<Country> getAll() {
		// TODO Auto-generated method stub
		String text=readData();
		Log.d("tag", text);
		return null;
	}

	@Override
	public Country get(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void delete(int id) {
		// TODO Auto-generated method stub

	}

}
